<!DOCTYPE html>
<!-- Created by huanggw on 2015/11/7. -->
<html ng-app="login">
<head lang="en">
    <meta charset="UTF-8">
    <title>登录</title>
    <script src="http://apps.bdimg.com/libs/angular.js/1.5.0-beta.0/angular.min.js"></script>
    <script src="/javascripts/server.js"></script>
    <script src="/javascripts/login.js"></script>
    <link rel='stylesheet' href='/stylesheets/header.css' />
    <link rel='stylesheet' href='/stylesheets/reg_login.css' />
</head>
<body ng-controller="loginCtrl">
<div id="header"><a href="/">SchoolGate3D</a></div>
<div style="width: 100%; height: calc(100% - 36px);overflow: hidden;">
    <div class="templete">
        <div style="float:left; background: #eeeeee; height: 100%; width: 100%">
            <div class="wrapper {{status}}">
                <div class="container">
                    <h1>Welcome</h1>
                    <form class="form" name="loginform" novalidate=”novalidate” ng-submit="loginForm()" id="form">
                        <input type="text" name="username" ng-model="username" placeholder="用户名/邮箱" ng-pattern="/^[a-zA-Z0-9_]+/" ng-minlength="3" ng-maxlength="10" required>
                        <div class="error" ng-show="loginform.username.$dirty && loginform.username.$invalid">填写不正确</div>
                        <input type="password" name="password" ng-model="password" placeholder="密码" ng-pattern="/^[a-zA-Z0-9_]*/" ng-minlength="6" ng-maxlength="13" required>
                        <div class="error" ng-show="loginform.password.$dirty && loginform.password.$invalid">填写格式不对</div>
                        <button type="submit" id="login-button" ng-disabled="loginform.$invalid">登录</button>
                        <div class="tip">没有账号,<a href="/regist">现在注册</a>或<a href="/">返回首页</a></div>
                    </form>
                    <div class="success" id="success">
                        <div style="line-height: 36px; height: 36px">{{loginTip}}，正在跳转回首页
                            <img src="/images/rotation.png">
                        </div>
                        <a ng-show="loginStatus == 0" href="/login">重新登录</a><a ng-show="loginStatus == 1" href="/home/?user={{username}}">个人中心</a>
                        <span style="font-size: small">或</span>
                        <a href="/">返回首页</a>
                    </div>
                </div>

                <ul class="bg-bubbles">
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                </ul>

            </div>
        </div>
    </div>
</div>
</body>
</html>